<table id="video_content" class="table table-striped">  
  {% for video in videos %}

    <tr data-id="{{ video.videoid }}">
      <td>
        <a href="/curate_videos#player">
          <p>{{ video.uploader }}</p>

          <div id="iframe{{video.videoid}}"><img id="img{{video.videoid }}" data-original="{{ video.thumbnail }}" src="/static/img/loading.gif" width="160" height="120" /></div>
         
        </a>
      </td>
      <td>
        <p class="meta">
          <span class="date">{{ video.published }}</span>
          <span class="views" id="{{ video.videoid }}_view_counts">{{ video.view_count|intcomma }} view{{ video.view_count|pluralize }}</span>
          {% if video.published|date:"Ymd" >= new_from|date:"Ymd" %}<b class="label label-success">NEW</b>{% endif %}
          
        </p>
        <h3>{{ video.title|truncate_dot:67 }}</h3>

        <p >{{ video.description|truncate_dot:500 }}</p>
     
        <p class="tags">       
          {% if tagging_checkboxes %}
            <a href="#" class="btn btn-mini edit" data-form="fta{{ forloop.counter }}"><i class="icon-tags"></i> Add tags</a>
          {% else %}
            <i class="icon-warning-sign"></i>No tags setup, please do so in the profile page.
          {% endif %}
         <span id="{{video.videoid}}_tags">
          {% for tags in video.tags_list %}
          <span class="label">{{tags}}</span>
          {% endfor %}
          </span>
        </p>

        <p class="geo" id="{{video.videoid}}_geos_list">
           {% if video.geo_type == "deny" %}            
              <b data-title="Denied in these countries">
                {% for r in video.geos_list %}
                  <span class="label label-important">{{ r }}</span>
                {% endfor %}
               </b>
           {% else %}{% if video.geo_type == "allow" %}

               <b data-title="Allowed in these countries">
                {% for r in video.geos_list %}
                  <span class="label label-important">{{ r }}</span>
                {% endfor %}
               </b>
           {% else %}
               <b data-title="Allowed in these countries">
                <span class="label label-success">All Countries</span>
               </b>
           {% endif %}
        {% endif %}
        </p>

        <form method="post" data-videoid="{{ video.videoid }}" action="/additional_tags" class="tags modal-form form-horizontal" id="fta{{ forloop.counter }}">
          <input type="hidden" value="{{ video.videoid}}" name="videoid" />
          <ul class="unstyled multi-column">
            {% for tag_name in tagging_checkboxes %}<li> <label for="manual_tagging{{forloop.counter}}" class="checkbox"><input name="tag_names" type="checkbox" value="{{tag_name}}">{{tag_name}}</label></li>{% endfor %}
        </ul>
          <br/>
          <input type="submit" class="btn btn-primary" value="Save"/>
        </form>

      </td>
    </tr>
    {% endfor %}
  </table>
